Integrand size = 16, antiderivative size = 55 \[ \int \frac {\csc ^3(x)}{a \cos (x)+b \sin (x)} \, dx=\frac {b \cot (x)}{a^2}-\frac {\csc ^2(x)}{2 a}+\frac {\left (a^2+b^2\right ) \log (\sin (x))}{a^3}-\frac {\left (a^2+b^2\right ) \log (a \cos (x)+b \sin (x))}{a^3} \]
[Out]
Time = 0.15 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.375, Rules used = {3182, 3852, 8, 3180, 3556, 3212} \[ \int \frac {\csc ^3(x)}{a \cos (x)+b \sin (x)} \, dx=\frac {b \cot (x)}{a^2}+\frac {\left (a^2+b^2\right ) \log (\sin (x))}{a^3}-\frac {\left (a^2+b^2\right ) \log (a \cos (x)+b \sin (x))}{a^3}-\frac {\csc ^2(x)}{2 a} \]
[In]
[Out]
Rule 8
Rule 3180
Rule 3182
Rule 3212
Rule 3556
Rule 3852
Rubi steps \begin{align*} \text {integral}& = -\frac {\csc ^2(x)}{2 a}-\frac {b \int \csc ^2(x) \, dx}{a^2}+\frac {\left (a^2+b^2\right ) \int \frac {\csc (x)}{a \cos (x)+b \sin (x)} \, dx}{a^2} \\ & = -\frac {\csc ^2(x)}{2 a}+\frac {b \text {Subst}(\int 1 \, dx,x,\cot (x))}{a^2}+\frac {\left (a^2+b^2\right ) \int \cot (x) \, dx}{a^3}-\frac {\left (a^2+b^2\right ) \int \frac {b \cos (x)-a \sin (x)}{a \cos (x)+b \sin (x)} \, dx}{a^3} \\ & = \frac {b \cot (x)}{a^2}-\frac {\csc ^2(x)}{2 a}+\frac {\left (a^2+b^2\right ) \log (\sin (x))}{a^3}-\frac {\left (a^2+b^2\right ) \log (a \cos (x)+b \sin (x))}{a^3} \\ \end{align*}
Time = 1.30 (sec) , antiderivative size = 48, normalized size of antiderivative = 0.87 \[ \int \frac {\csc ^3(x)}{a \cos (x)+b \sin (x)} \, dx=\frac {2 a b \cot (x)-a^2 \csc ^2(x)+2 \left (a^2+b^2\right ) (\log (\sin (x))-\log (a \cos (x)+b \sin (x)))}{2 a^3} \]
[In]
[Out]
Time = 0.56 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.96
method | result | size |
default | \(-\frac {1}{2 a \tan \left (x \right )^{2}}+\frac {\left (a^{2}+b^{2}\right ) \ln \left (\tan \left (x \right )\right )}{a^{3}}+\frac {b}{a^{2} \tan \left (x \right )}-\frac {\left (a^{2}+b^{2}\right ) \ln \left (a +b \tan \left (x \right )\right )}{a^{3}}\) | \(53\) |
norman | \(\frac {-\frac {1}{8 a}-\frac {\tan \left (\frac {x}{2}\right )^{4}}{8 a}+\frac {b \tan \left (\frac {x}{2}\right )}{2 a^{2}}-\frac {b \tan \left (\frac {x}{2}\right )^{3}}{2 a^{2}}}{\tan \left (\frac {x}{2}\right )^{2}}+\frac {\left (a^{2}+b^{2}\right ) \ln \left (\tan \left (\frac {x}{2}\right )\right )}{a^{3}}-\frac {\left (a^{2}+b^{2}\right ) \ln \left (\tan \left (\frac {x}{2}\right )^{2} a -2 b \tan \left (\frac {x}{2}\right )-a \right )}{a^{3}}\) | \(96\) |
parallelrisch | \(\frac {-\csc \left (x \right )^{2} a^{2}-\cot \left (x \right )^{2} a^{2}+4 \cot \left (x \right ) a b -4 a^{2} \ln \left (\frac {-2 a \cos \left (x \right )-2 b \sin \left (x \right )}{\cos \left (x \right )+1}\right )-4 b^{2} \ln \left (\frac {-2 a \cos \left (x \right )-2 b \sin \left (x \right )}{\cos \left (x \right )+1}\right )+4 \ln \left (\csc \left (x \right )-\cot \left (x \right )\right ) a^{2}+4 \ln \left (\csc \left (x \right )-\cot \left (x \right )\right ) b^{2}}{4 a^{3}}\) | \(105\) |
risch | \(\frac {2 i \left (-i a \,{\mathrm e}^{2 i x}+b \,{\mathrm e}^{2 i x}-b \right )}{\left ({\mathrm e}^{2 i x}-1\right )^{2} a^{2}}+\frac {\ln \left ({\mathrm e}^{2 i x}-1\right )}{a}+\frac {\ln \left ({\mathrm e}^{2 i x}-1\right ) b^{2}}{a^{3}}-\frac {\ln \left ({\mathrm e}^{2 i x}-\frac {i b +a}{i b -a}\right )}{a}-\frac {\ln \left ({\mathrm e}^{2 i x}-\frac {i b +a}{i b -a}\right ) b^{2}}{a^{3}}\) | \(127\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 117 vs. \(2 (53) = 106\).
Time = 0.27 (sec) , antiderivative size = 117, normalized size of antiderivative = 2.13 \[ \int \frac {\csc ^3(x)}{a \cos (x)+b \sin (x)} \, dx=-\frac {2 \, a b \cos \left (x\right ) \sin \left (x\right ) - a^{2} + {\left ({\left (a^{2} + b^{2}\right )} \cos \left (x\right )^{2} - a^{2} - b^{2}\right )} \log \left (2 \, a b \cos \left (x\right ) \sin \left (x\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (x\right )^{2} + b^{2}\right ) - {\left ({\left (a^{2} + b^{2}\right )} \cos \left (x\right )^{2} - a^{2} - b^{2}\right )} \log \left (-\frac {1}{4} \, \cos \left (x\right )^{2} + \frac {1}{4}\right )}{2 \, {\left (a^{3} \cos \left (x\right )^{2} - a^{3}\right )}} \]
[In]
[Out]
\[ \int \frac {\csc ^3(x)}{a \cos (x)+b \sin (x)} \, dx=\int \frac {\csc ^{3}{\left (x \right )}}{a \cos {\left (x \right )} + b \sin {\left (x \right )}}\, dx \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 119 vs. \(2 (53) = 106\).
Time = 0.20 (sec) , antiderivative size = 119, normalized size of antiderivative = 2.16 \[ \int \frac {\csc ^3(x)}{a \cos (x)+b \sin (x)} \, dx=-\frac {\frac {4 \, b \sin \left (x\right )}{\cos \left (x\right ) + 1} + \frac {a \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}}}{8 \, a^{2}} - \frac {{\left (a^{2} + b^{2}\right )} \log \left (-a - \frac {2 \, b \sin \left (x\right )}{\cos \left (x\right ) + 1} + \frac {a \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}}\right )}{a^{3}} + \frac {{\left (a^{2} + b^{2}\right )} \log \left (\frac {\sin \left (x\right )}{\cos \left (x\right ) + 1}\right )}{a^{3}} - \frac {{\left (a - \frac {4 \, b \sin \left (x\right )}{\cos \left (x\right ) + 1}\right )} {\left (\cos \left (x\right ) + 1\right )}^{2}}{8 \, a^{2} \sin \left (x\right )^{2}} \]
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 78, normalized size of antiderivative = 1.42 \[ \int \frac {\csc ^3(x)}{a \cos (x)+b \sin (x)} \, dx=\frac {{\left (a^{2} + b^{2}\right )} \log \left ({\left | \tan \left (x\right ) \right |}\right )}{a^{3}} - \frac {{\left (a^{2} b + b^{3}\right )} \log \left ({\left | b \tan \left (x\right ) + a \right |}\right )}{a^{3} b} - \frac {3 \, a^{2} \tan \left (x\right )^{2} + 3 \, b^{2} \tan \left (x\right )^{2} - 2 \, a b \tan \left (x\right ) + a^{2}}{2 \, a^{3} \tan \left (x\right )^{2}} \]
[In]
[Out]
Time = 21.32 (sec) , antiderivative size = 91, normalized size of antiderivative = 1.65 \[ \int \frac {\csc ^3(x)}{a \cos (x)+b \sin (x)} \, dx=\frac {\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right )\,\left (a^2+b^2\right )}{a^3}-\frac {\ln \left (-a\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2+2\,b\,\mathrm {tan}\left (\frac {x}{2}\right )+a\right )\,\left (a^2+b^2\right )}{a^3}-\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{8\,a}-\frac {b\,\mathrm {tan}\left (\frac {x}{2}\right )}{2\,a^2}-\frac {\frac {a}{2}-2\,b\,\mathrm {tan}\left (\frac {x}{2}\right )}{4\,a^2\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2} \]
[In]
[Out]